package com.luomo.wenyuan.modules.wenyuan.dao;

import com.luomo.wenyuan.modules.wenyuan.entity.TBookDetailEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author
 * @email
 * @date 2020-10-19 15:58:39
 */
@Mapper
public interface TBookDetailDao extends BaseMapper<TBookDetailEntity> {


    Integer countByBookIdAndStatus(@Param("bookId") int bookId, @Param("status") int status);

    Integer countByBookId(int bookId);

    TBookDetailEntity getOneByBookIdAndStatus(@Param("bookId") int bookId, @Param("status") int status);

    TBookDetailEntity getOneCanBorrow(@Param("bookId") int bookId);
}
